using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace Yozeev.BusinessLogic
{
    /// <summary>
    /// 暂存订单明细
    /// </summary>
    public class ActivityTempDetail : ByBranchEntity<Guid>
    {
        // <summary>
        /// 订单标识
        /// </summary>
        [Required(ErrorMessage = "订单标识不能为空")]
        public Guid ActivityTempId { get; set; }
        [ForeignKey("ActivityTempId")]
        public virtual ActivityTemp ActivityTemp { get; set; }
        /// <summary>
        /// 票型价格标识
        /// </summary>
        public Guid TicketPriceId { get; set; }
        [ForeignKey("TicketPriceId")]
        public virtual TicketPrice TicketPrice { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        [Required(ErrorMessage = "名称不能为空")]
        public string TicketName { get; set; }
        /// <summary>
        /// 价格
        /// </summary>
        [Required(ErrorMessage = "价格不能为空")]
        public decimal SalePrice { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        [Required(ErrorMessage = "数量不能为空")]
        public long Quantity { get; set; }
        /// <summary>
        /// 原价
        /// </summary>
        [Required(ErrorMessage = "原价不能为空")]
        public decimal UniPrice { get; set; }
        /// <summary>
        /// 折扣
        /// </summary>
        [Required]
        public decimal Discount { get; set; }
        /// <summary>
        /// 总金额
        /// </summary>
        public decimal TotalAmount { get; set; }
        /// <summary>
        /// 会员标识
        /// </summary>
        public Guid CustomerId { get; set; }
        [ForeignKey("CustomerId")]
        public virtual Customer Customer { get; set; }
        /// <summary>
        /// 航班标识
        /// </summary>
        public Guid? ScheduleId { get; set; }
        [ForeignKey("ScheduleId")]
        public virtual Schedule Schedule { get; set; }
        /// <summary>
        /// 仓位
        /// </summary>
        public WareHousePosition WarePosition { get; set; }
    }
}
